//
//  UIFont+runtime.m
//  WanCaiC8
//
//  Created by tangang on 2018/3/20.
//  Copyright © 2018年 tangang. All rights reserved.
//

#import "UIFont+runtime.h"
#import <objc/runtime.h>
@implementation UIFont (runtime)

+ (void)load{
    Method newMethod = class_getClassMethod([self class], @selector(adjustFont:));
    Method method = class_getClassMethod([self class], @selector(systemFontOfSize:));
    method_exchangeImplementations(newMethod, method);
}

+ (UIFont *)adjustFont:(CGFloat)fontSize {
    UIFont *newFont = nil;
    newFont = [UIFont adjustFont:fontSize * SCREEN_WIDTH/375.0];
    return newFont;
}
@end
